g_object_unref (context);
}
-static gboolean
-emit_changed (StThemeContext *context)
-{
- g_signal_emit (context, signals[CHANGED], 0);
- return FALSE;
-}
-
static void
st_theme_context_changed (StThemeContext *context)
{
context->root_node = NULL;
g_hash_table_remove_all (context->nodes);
- emit_changed (context);
+ g_signal_emit (context, signals[CHANGED], 0);
if (old_root)
g_object_unref (old_root);
}
+static gboolean
+changed_idle (gpointer userdata)
+{
+ st_theme_context_changed (userdata);
+ return FALSE;
+}
+
static void
on_icon_theme_changed (StTextureCache *cache,
StThemeContext *context)
/* Note that an icon theme change isn't really a change of the StThemeContext;
* the style information has changed. But since the style factors into the
* icon_name => icon lookup, faking a theme context change is a good way
- * to force users such as StIcon to look up icons again. Don't bother recreating
- * the root node, though. */
- g_idle_add ((GSourceFunc) emit_changed, context);
+ * to force users such as StIcon to look up icons again.
+ */
+ g_idle_add ((GSourceFunc) changed_idle, context);
}
/**